#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    connect(&ConnectMng::getInstance(), &ConnectMng::connCreated, this, [](){
        qDebug()<<"main:"<<ConnectMng::getInstance().getDBConnMap().size();
    });

    initData();
    initToolBar();
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_action_connect_triggered()
{
    DBConnectionUI conn;
    conn.exec();
}

void MainWindow::initData()
{
    //从本地初始化连接map
}

void MainWindow::initToolBar()
{

}


void MainWindow::on_action_quit_triggered()
{
    this->close();
}

